home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / etc / menu-methods / xdg-desktop-entry-spec-apps < prev    next >
Encoding:
Text File  |  2010-01-17  |  1.4 KB  |  63 lines

  1. #!/usr/bin/install-menu
  2. # xdg desktop entry spec - applications generation
  3. # http://www.freedesktop.org/Standards/desktop-entry-spec
  4. # Copyright 2004 - Chris Cheney
  5. # Licensed under the GNU General Public License, version 2.
  6.  
  7. !include lang.h
  8. !include menu.h
  9.  
  10. compat="menu-2"
  11. outputencoding="UTF-8";
  12. outputlanguage="C";
  13.  
  14. function name() =
  15.     "Name=" title() "\n"
  16.     forall(sections_translations(),"lang",
  17.         "Name[" $lang "]=" translate($lang,title())
  18.              "\n");
  19.  
  20. function comment() =
  21.     "Comment=" $longtitle "\n"
  22.     forall(sections_translations(),"lang",
  23.         "Comment[" $lang "]=" translate($lang,$longtitle)
  24.              "\n");
  25.  
  26.  
  27. function AppEntry($terminal) =
  28.     "[Desktop Entry]\n"
  29.     "Type=Application\n"
  30.     "Encoding=UTF-8\n"
  31.     name()
  32.     ifnempty($longtitle, comment())
  33.     ifnempty($generictitle,"GenericName=" $generictitle "\n")
  34.     ifnempty(icon(),"Icon=" icon() "\n")
  35.     "Exec=" $command "\n"
  36.     "Terminal=" $terminal "\n"
  37.     "Categories=X-Debian" replacewith($basesection,"/ ","--") ";\n";
  38.  
  39. supported;
  40.  x11 = AppEntry("false");
  41.  text = AppEntry("true");
  42. endsupported;
  43.  
  44. startmenu = "";
  45. endmenu = "";
  46. submenutitle = "";
  47.  
  48. treewalk = "M";
  49.  
  50. genmenu = ifnempty($command,"X-Debian" replacewith($basesection,"/ ","--") "-" tolower(replacewith($title,"/ ","__") ".desktop"));
  51.  
  52. rootsection = "";
  53.  
  54. prerun     = "rm -rf  '" prefix() "'";
  55.  
  56. removemenu = "rm -rf  '" prefix() "'";
  57.  
  58. preoutput = "";
  59.  
  60. rootprefix = "/var/lib/menu-xdg/applications/menu-xdg";
  61.  
  62. userprefix = ".local/share/applications/menu-xdg";
  63.